
import pymysql
if __name__ == '__main__':
    conn=pymysql.connect(host="localhost",port=3308,db="xuexiao",user="root",password="root1234")
    cursor=conn.cursor()
    sql='''
    insert into student(name,qq,telephone,addr,birthday,sex)
values('蒋磊臣','13544','13166663434','合肥市蜀山区','2005-1-15','男')
    '''
    r=cursor.execute(sql)
    print("结果是：",r)
    conn.commit()
    conn.close()